<template>
  <div>
        <el-form ref="form" :model="form" :rules="rules" label-width="80px">
          <el-form-item label="派件收费" prop="first">
            <el-input v-model="form.first" @change="xiu"></el-input>
          </el-form-item>
          <el-form-item label="寄件收费" prop="second">
            <el-input v-model="form.second" @change="xiu"></el-input>
          </el-form-item>
        </el-form>
  </div>
</template>

<script>
import axios from "axios";
export default {
  data() {
    return {
      form:{},
      rules:{},
      activeIndex: '10',
      name: sessionStorage.getItem("name"),
    };
  },
  created() {
    this.cha();
  },
  methods: {
    ba(){
      this.$router.push(
          {path: "/dropdown"}
      )
    },
    xitong(){
      this.$router.push(
          {path: "/OutSystems"}
      )
    },
    cha(){
      axios.post("http://localhost:10062/system/kan4").then(res =>{
        this.form=res.data;
      })
    },
    xiu(){
      axios.post("http://localhost:10062/system/gai4",this.form).then(res =>{
        console.log(res);
        this.$message({
          message: '恭喜你，修改成功',
          type: 'success'
        });
      })
    },
    expressList(){
      this.$router.push(
          {path: "/expressList"}
      )
    },
    dshezhi(){
      this.$router.push(
          {path: "/outkey"}
      )
    },
    bao(){
      this.$router.push(
          {path: "/OutPackage"}
      )
    },
    handleSelect(key) {
      console.log(key);
    },
    notice() {
      this.$router.push(
          {path: "/HomePage"}
      )
    },
    //跳转其他页面
    other() {
      this.$router.push(
          {path: "/otherView"}
      )
    }
  }
};
</script>

<style lang="less">
#app {
  margin-top: 0;
}

.home-container {
  height: 100%;
}

.el-header {
  background-color: #545c64;
  display: flex; //设置显示为flex布局
  justify-content: space-between; //设置为flex左右布局
  padding-left: 0; //左内边距为0（Logo贴左边）
  align-items: center; //元素上下居中（防止右边按钮贴上下边）
  color: #fff;
  font-size: 18px;

  > div {
    //内嵌的div样式
    display: flex;
    align-items: center; //Logo和文字上下居中
    #fontLogo {
      width: 200px;
      margin-left: 10px; //文字左侧设置间距，防止与Logo紧贴
    }
    #fontName {
      width: 120px;
      margin-right: 10px;
    }
  }
}

#indexMenu {
  width: 100%;
}

.el-menu {
  background-color: #545c64;
}

.el-aside {
  background-color: #545c64;
  scrollbar-width: none; /* firefox */
  -ms-overflow-style: none; /* IE 10+ */
  overflow-x: hidden;
  overflow-y: auto;
}

.el-main {
  background-color: #eaedf1;
  height: 1000px;
}
</style>
